export interface User {
  id: number;
  username: string;
  email: string;
  created_at: string;
}

export interface Author {
  id?: number;
  name: string;
  alias?: string;
  birth_year?: string;
  death_year?: string;
  dynasty?: string;
  intro?: string;
  representative_works?: string;
  avatar_url?: string;
  created_at?: string;
  updated_at?: string;
}

export interface LiteraryWork {
  id: number;
  title: string;
  author_id?: number;
  author?: Author;  // 修改为Author对象类型
  content: string;
  genre?: string;
  publication_date?: string;
  dynasty?: string;  // 添加朝代字段
  background?: string;  // 添加背景内容字段
  meaning?: string;  // 添加含义内容字段
  annotation?: string;  // 添加注释内容字段
  created_at: string;
}